window.config = {
  apiUrl: "http://192.168.110.249/mt/",
};
//伤员echarts配置
const options = {
  tooltip: {
    trigger: "axis",
    backgroundColor: "#12739180", //背景颜色
    borderColor: "#3b9bb4", //边框颜色
    textStyle: {
      color: " #e6f7ff", //文本颜色
      align: "left", //文本对齐方式
      fontSize: "20",
    },
    axisPointer: {
      type: "cross",
      label: {
        backgroundColor: "#081d2530",
      },
    },
  }, //提示框设置
  legend: {},
  yAxis: {
    show: true,
    name: "位",
    splitLine: {
      //设置条纹显示 柱状图默认yAxis(true)
      show: true,
      //设置lineStyle即可写入样式即可
      lineStyle: {
        //这里输入线条的样式
        color: "#e6f7ff80",
        type: "dashed",
        width: 1,
      },
    },
    nameTextStyle: {
      color: "#d9f8ff",
      fontSize: "3.4rem",
    },
    axisLabel: {
      color: "#d9f8ff",
      fontSize: "3.4rem",
    },
  },

  xAxis: {
    type: "category",
    show: true,
    data: [],
    axisLabel: {
      color: "#d9f8ff",
      fontSize: "3.4rem",
    },
  },
  series: [
    {
      data: [],
      type: "bar",

      itemStyle: {
        color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
          { offset: 0, color: "#1891FE" }, // 0%处的颜色
          { offset: 0.5, color: "#0BB3F8" }, // 50%处的颜色
          { offset: 1, color: "#73E6FF" }, // 100%处的颜色
        ]),
      },
      emphasis: {
        itemStyle: {
          color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
            { offset: 0, color: "#73E6FF" }, // 0%处的颜色
            { offset: 0.5, color: "#0BB3F8" }, // 50%处的颜色
            { offset: 1, color: "#1891FE" }, // 100%处的颜色
          ]),
        },
      },
    },
  ],
};
//highCharts配置
const highOptions = {
  color: ["#6BEFBC", "#00B4F6"],
  tooltip: {
    trigger: "item",
    backgroundColor: "#12739180", //背景颜色
    borderColor: "#3b9bb4", //边框颜色
    textStyle: {
      color: " #e6f7ff", //文本颜色
      align: "left", //文本对齐方式
      fontSize: "20",
    },
    axisPointer: {
      type: "cross",
      label: {
        backgroundColor: "#081d2530",
      },
    },
  }, //提示框设置
  series: [
    {
      name: "床位",
      type: "pie",
      radius: "60%",
      center: ["50%", "50%"],
      // roseType: "radius",
      padAngle: 5,
      avoidLabelOverlap: false,
      itemStyle: {
        borderRadius: 10,
        borderColor: "#fff",
        borderWidth: 0,
      },
      label: {
        show: false,
        position: "center",
      },
      labelLine: {
        show: false,
      },
      data: [],
    },
  ],
};
//3D配置
const threeOptions = {
  //引号内获取H5标签id名（不加#号获取）
  chart: {
    type: "pie",
    backgroundColor: "rgba(0, 0, 0, 0)", //去掉白色背景
    options3d: {
      enabled: true, //3D启用
      alpha: 45, //内旋转角度
      beta: 0, //外选择角度
    },
  },
  // 禁用导出功能
  exporting: {
    enabled: false,
  },
  credits: {
    enabled: false, //去除右下角Highcharts.com链接标签
  },
  title: {
    text: "",
  },
  tooltip: {
    //鼠标触摸显示值
    pointFormat: "{series.name}: <b>{point.percentage:.1f}%</b>",
  },
  legend: {
    layout: "vertical", //垂直排列
    align: "right", // 将图例对齐到右侧
    verticalAlign: "middle", // 垂直对齐方式
    x: 0, // 距离容器右侧的距离
    y: 0, // 距离容器上部的距离
    floating: true, // 允许图例浮动
    itemStyle: {
      color: "#FFFFFF", //图例字体颜色，这里修改颜色后鼠标hover后的颜色不会被修改（需要style修改鼠标hover时字体颜色：.highcharts-legend-item:hover text {fill: #CCCCCC !important;}）
    },
  },
  plotOptions: {
    //数据列配置
    pie: {
      allowPointSelect: true, //每个扇块能否选中
      cursor: "pointer",
      depth: 30, //3D饼图的厚度
      showInLegend: false, //true显示图例
      size: "80%", //饼图大小
      dataLabels: {
        enabled: false,
        distance: -30, //去线条
        format: "<b>{point.y}</b>", //值显示在饼图区域内
      },
    },
  },
  series: [
    //数据
    {
      type: "pie",
      data: [],
      colors: ["#00B4F6", "#6BEFBC"],
    },
  ],
};
